package com.glsc.ngateway.common.base.repo.oracle.yongyou;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.glsc.ngateway.common.base.domain.oracle.yongyou.Fkzh;
import com.glsc.ngateway.common.base.domain.oracle.yongyou.Skzh;

/**
 * @author houzhc
 * @description: TODO hzc
 * @date 2024年07月09日
 */
public interface SkzhRepo extends JpaRepository<Skzh, String>, JpaSpecificationExecutor<Skzh> {

    @Query("select m from Skzh m where m.yhzhzj=:yhzhzj")
    Skzh findByYhzhzj(@Param("yhzhzj") String yhzhzj);

    @Query(value = "select * from GLZJ.V_SKZH m where m.YHZHZJ=:yhzhzj", nativeQuery = true)
    Skzh findByYhzhzjOrg(@Param("yhzhzj") String yhzhzj);

    @Query("select m from Skzh m where m.yhzh=:yhzh")
    Skzh findByYhzh(@Param("yhzh") String yhzh);
}
